package test4;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Repository;

@Configuration
@EnableAutoConfiguration
@ComponentScan
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }

    // 示例Repository组件
    @Repository
    public class SimpleDataRepository {
        public String getData() {
            return "Data from SimpleDataRepository";
        }
    }

    // 示例配置Bean
    @Bean
    public SimpleDataRepository simpleDataRepository() {
        return new SimpleDataRepository();
    }
}

